/**
 * 该模块主要负责创建用户模型
 */
let mongoose = require("mongoose")
let Schema = mongoose.Schema

let userSchema = new Schema({
    email: {
        type: String,
        require: true,
        unique: true
    },
    nick_name: {
        type: String,
        require: true,      
    },
    password: {
        type: String,
        required: true
    },
    date: {
        type: Date,
        default: Date.now()
    },
    enable_flag: {
        type: String,
        default: "Y"
    }
})

module.exports = mongoose.model("users", userSchema)